///*
// * To change this template, choose Tools | Templates
// * and open the template in the editor.
// */
//package pio.action.administrador.rutas;
//
//import DBMS.DataBaseManager;
//import clases.Coordinador;
//import clases.Institucion;
//import clases.Ruta;
//import java.util.ArrayList;
//import java.util.List;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import org.apache.struts.action.ActionForm;
//import org.apache.struts.action.ActionForward;
//import org.apache.struts.action.ActionMapping;
//import org.apache.struts.actions.DispatchAction;
//
///**
// *
// * @author tamerdark
// */
//public class Consultar extends DispatchAction {
//
//    public ActionForward find(ActionMapping mapping, ActionForm form,
//            HttpServletRequest request, HttpServletResponse response)
//            throws Exception {
//        Ruta c = (Ruta) form;
//
//        DataBaseManager dbms = DataBaseManager.getInstance();
//                List li = dbms.consultarRuta(c);
//        if (li.isEmpty()) {
//            c.setMensaje("No se encontraron coincidencias.");
//            return mapping.findForward("failure");
//        } else {
//            request.setAttribute("rutas", li);
//            return mapping.findForward("success");
//        }
//    }
//
//    public ActionForward populate(ActionMapping mapping, ActionForm form,
//            HttpServletRequest request, HttpServletResponse response)
//            throws Exception {
//        request.setAttribute("instituciones", Institucion.getAll()); // Necesitado para mostrar nombre de institucion
//        return mapping.findForward("failure");
//    }
//}
